import React from "react";
import Child1 from "../components/Child1";
import NumContext from "../context/NumContext";

export default function UseContext() {
  return (
    <div>
      <h3>跨层级的组件通信</h3>
      <NumContext.Provider value={{
        num:999
      }}>
        <Child1></Child1>
      </NumContext.Provider>
    </div>
  );
}
